package com.chat.service;

import com.chat.Local;
import com.chat.common.Group;
import com.chat.common.Message;
import com.chat.common.MessageType;

/*
   该类用于创建群聊
 */
public class CreatGroup {
      public void creategroup(String groupid,String groupname,String groupinfo,byte[] b,String time){
            Message msg=new Message();
            msg.setMesType(MessageType.MEESAGE_CREATE_GROUP);
            Group group=new Group();
            group.setTime(time);
            group.setHeadpicture(b);
            group.setId(groupid);
            group.setCount("0");
            group.setName(groupname);
            group.setInfo(groupinfo);
            Local.group=group;
            msg.setData(group);
            ClientConnectServerThread clientConnectServerThread=ManageClientConnectServerThread.getClientConnectServerThread(Local.user.getUsername());
            clientConnectServerThread.send(msg);

      }
}
